<template>
  <div class="content-test">
    <button @click="btn">btn</button>
    <div class="content-test-banner">
      <div class="content-test-box"></div>
      <div class="content-test-box"></div>
      <div class="content-test-pointer" v-if="show"></div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      show: false
    };
  },
  methods: {
    btn() {
      this.show = true;
      setTimeout(() => {
        this.show = false;
      }, 500);
    }
  }
};
</script>

<style lang="scss" scoped>
.content-test {
  &-banner {
    display: flex;
    flex-direction: row;
    margin-top: 100px;
    position: relative;
  }

  &-box {
    width: 100px;
    height: 80px;
    border: 1px solid red;
    margin: 10px 60px;
  }

  &-pointer {
    width: 10px;
    height: 10px;
    background: red;
    border-radius: 50%;
    position: absolute;
    top: 71px;
    left: 329px;
    animation: mymove .5s linear both;
  }
}
@keyframes mymove {
  0% {
    top: 71px;
    left: 103px;
  }
  10%{
    top: -53px;
    left: 103px;
  }
  50% {
    top: -53px;
    left: 214px;
  }
  90%{
    top: -53px;
    left: 329px;
  }
  100% {
    top: 71px;
    left: 329px;
  }
}
</style>
